//混入
export const itemListenerMixin={
  data(){
    return {
       DetailItemListener:null
    }
  },
   mounted() {
      const result = this.debounce(this.$refs.scroll.scroll.refresh())
      this.DetailItemListener=()=>{
            result()
      }
      this.$bus.$on('imageLoad',this.DetailItemListener)
      console.log('我是混入的~')
   },
   methods: {
      //防抖
     debounce(func,delay){
          let timer=null
          return function(...args){
             if(timer) clearTimeout(timer)
             timer=setTimeout(()=>{
                func.apply(this,args)
             },delay)
          }
     }
   },
}

//混入backTop
export const backTop={
   data(){
      return {
         show:false
      }
   },
   methods:{
      backTop(){
         this.$refs.scroll.scrollTop(0,0,1000)
         console.log(this.$refs.scroll.message)
         console.log(this.$refs.scroll)
       },
   }
}